package com.xbongbong.pro.domain.dao;

import com.xbongbong.pro.domain.entity.AppModuleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @description: 模板中心
 * @Author: hongxiao
 * @date: 2019-03-02 17:43
 * @since v1.0
 */
@Repository
@Mapper
public interface AppModuleDao {
    Integer insert(AppModuleEntity indexSetEntity);

    Integer update(AppModuleEntity indexSetEntity);

    Integer deleteByKey(@Param("key") Long key);

    AppModuleEntity getByKey(@Param("key") Long key);

    AppModuleEntity getByKeyIgnoreDel(@Param("key") Long key);

    /**
     * 根据别名获取应用
     * @param alias
     * @return
     */
    AppModuleEntity getByAlias(@Param("alias") String alias);

    List<AppModuleEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    List<AppModuleEntity> getAllList();

    AppModuleEntity getByMirrorId(@Param("mirrId") Long mirrorId);

    void updateBatch(@Param("list") List<AppModuleEntity> list);

    void updateName(@Param("id") Long id, @Param("name") String name, @Param("instruction") String instruction);
}
